package com.example.aigc_education.enums;

import lombok.Getter;

@Getter
public enum ChatConvStatus {
    DELETE("删除", 0),
    NORMAL("正常", 1),
    ARCHIVED("已归档", 2);

    private final String title;

    private final int value;

    ChatConvStatus(String title, int value) {
        this.title = title;
        this.value = value;
    }

    public static ChatConvStatus fromValue(int value) {
        for (ChatConvStatus convStatus : ChatConvStatus.values()) {
            if (convStatus.getValue() == value) {
                return convStatus;
            }
        }
        throw new IllegalArgumentException("No enum constant with value " + value);
    }
}
